<?php
/**
 * notes groupindex view
 *
 * @package    FinalsClub
 * @subpackage notes
 * @author     Colin Hom
 * @description  Lists all courses for a group, for purpose of displaying notes
 */
use_helper('Pagination', 'Note');
slot('coursesNav', 'active'); 
?>
<div class="courses" id="wrapper">
	<?php include_partial('global/systemMessages') ?>
	<div id="content">
		<div id="main">			
			<div class="main-heading">
				<h1><?= $group->getName() ?></h1>
			</div>
			<?php include_partial('groups/subnav',array("group_id" => $group_id, "current" => "Notes")) ?>
			<div class="filter-links with-icon">
				<ul class="book inline">
					<li>Group Courses </li><br>
					<li><span STYLE="font-size:10px">Select A Course Link to View This Group's Notes for That Course</span></li>
				</ul>
			</div>
		<!-- moved this bit (listing the courses for the group) to the courses controller... -->

			<?php include_component('courses','list',array("group_id" => $group_id, "page" => $page, "group_display" => true)) ?>
		
		</div>
		<div id="sidebar">		
			<?php include_component('group_members', 'pending', array('group_id' => $group->getId()))?>
			<?php include_component('group_members', 'list', array('group_id' => $group->getId()))?>
		</div>
	</div>

</div>

<script>
	$(document).ready(function(){
		$(".share").click(function(){
			var options = {
				data: {state: this.id},
				success:  function(response){ alert(response)},
			}
			$("#" + this.name).ajaxSubmit(options);	
		});
		
		$(".share").confirm({
			timeout:3000,
			dialogShow:'fadeIn',
			dialogSpeed:'slow',
			msg: "Change course materials permissions?",
			buttons: {
				wrapper:'<button></button>',
				separator:'  '
		  }  

			
		});
		
	});
	
</script>